| Species | Female Adult | Female Juvenile | Male Adult | Male Juvenile |
|---|---|---|---|---|
| Blacknose | OK | OK | OK | OK |
| Blacktip | OK | OK | OK | OK |
| Bull | OK | OK | OK | OK |
| Sandbar | OK | OK | OK | OK |
| Sharpnose | OK | OK | OK | OK |
| Spinner | OK | OK | OK | OK |
| Tiger | OK | OK | OK | OK |
| Species | Female Adult | Female Juvenile | Male Adult | Male Juvenile |
|---|---|---|---|---|
| Blacknose | OK | OK | OK | OK |
| Blacktip | OK | OK | OK | OK |
| Bull | Failed | Failed | Failed | Failed |
| Sandbar | OK | OK | Failed | OK |
| Sharpnose | OK | OK | OK | OK |
| Spinner | Failed | OK | Failed | OK |
| Tiger | Failed | OK | Failed | OK |
The Primary Species I will Use are going to be Blacknose, Blacktip, and Sharpnose because they were fit for all levels of sex and maturity in both strata
#### Strata 1 ####
## Female Adult
filenames_s1_FA <- list.files("output/output_GAM/strat1/Female_Adult", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s1_FA ) ){ load( file = filenames_s1_FA[ i ] ) }
rm( filenames_s1_FA )
bn_s1_FA$results ### top 3 dAIC < 4
bn.top_s1_FA <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal
summary(bn.top_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.851 2.911 -2.01 0.0445 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 26.310 35.053 63.382 0.00229 **
## s(I(startdepth^0.25)) 4.454 4.770 47.319 2.83e-09 ***
## s(tempbotm) 2.516 2.993 12.362 0.00680 **
## s(turbbotm) 1.000 1.000 0.845 0.35788
## s(oxybotm) 4.231 5.112 10.960 0.05638 .
## s(salbotm) 1.001 1.003 6.121 0.01351 *
## s(year) 7.362 16.000 13.580 0.02096 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.218 Deviance explained = 29.6%
## UBRE = -0.49073 Scale est. = 1 n = 2674
turbbotm not significant and edf = 1. salbotm p-value suggests significance but edf is approximatly equal to 1.
par(mfrow = c(2,2))
gam.check(bn.top_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 7 iterations.
## Gradient range [-1.007571e-07,4.054833e-08]
## (score -0.4907316 & scale 1).
## Hessian positive definite, eigenvalue range [5.598889e-08,0.001193232].
## Model rank = 119 / 119
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 74.00 26.31 0.92 <2e-16 ***
## s(I(startdepth^0.25)) 7.00 4.45 0.98 0.710
## s(tempbotm) 5.00 2.52 0.98 0.650
## s(turbbotm) 4.00 1.00 0.98 0.510
## s(oxybotm) 7.00 4.23 1.01 0.975
## s(salbotm) 4.00 1.00 0.95 0.055 .
## s(year) 17.00 7.36 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Plot of Residuals against linear predictor looks strange to me. The histogram of the residuals has a gap in it.
k` looks good for all variables.
par(mfrow = c(3,2))
#par(mfrow = c(1,1))
for(i in 2:7){
plot(bn.top_s1_FA,
select = i)
abline(h = 0, col = "red", lty = 2)
}
root startdepth, turbbotm, are zero throughout their entire range
tempbotm, oxybotm maybe zero throughout it’s entire range.
salbotm looks linear and increasing very slightly.
I want to look at another model without the turbbotm smooth.
bn.2_s1_FA <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Oxy_Sal
summary(bn.2_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + s(year,
## bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.350 2.143 -2.497 0.0125 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 21.038 28.007 63.793 0.000131 ***
## s(I(startdepth^0.25)) 4.329 4.675 54.298 1.1e-10 ***
## s(tempbotm) 2.442 2.924 10.293 0.018946 *
## s(oxybotm) 3.965 4.736 10.649 0.080266 .
## s(salbotm) 1.001 1.002 6.608 0.010218 *
## s(year) 7.715 16.000 15.602 0.009434 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.211 Deviance explained = 28.4%
## UBRE = -0.48695 Scale est. = 1 n = 2737
salbotm edf is still near 1 but i think this is ok.
par(mfrow = c(2,2))
gam.check(bn.2_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 7 iterations.
## Gradient range [-4.871036e-07,1.419548e-08]
## (score -0.4869459 & scale 1).
## Hessian positive definite, eigenvalue range [4.863151e-07,0.001296961].
## Model rank = 99 / 99
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 59.00 21.04 0.92 <2e-16 ***
## s(I(startdepth^0.25)) 7.00 4.33 0.99 0.83
## s(tempbotm) 5.00 2.44 0.97 0.33
## s(oxybotm) 6.00 3.97 1.00 0.94
## s(salbotm) 4.00 1.00 0.94 0.07 .
## s(year) 17.00 7.71 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
k` looks good for all variables
par(mfrow = c(2,2))
#par(mfrow = c(1,1))
for(i in 2:5){
plot(bn.2_s1_FA,
select = i)
abline(h = 0, col = "red", lty = 2)
}
par(mfrow = c(1,1))
plot(bn.2_s1_FA,
select = 6)
root startdepth is zero throughout it’s entire range but is close near 2.5 and 3.5. tempbotm zero throughouts it’s entire range but it is very hard to tell near 18-19 or 27. Oxybotm Zero below 8 Positive 8-10, and zero above 10 (but wide CI). salbotm again appears linear and negative to left increasing to right (negative below approx. 32 and Pos above approx. 37.5 Zero between).
For good measure I want to look at the 2nd ranged model
bn.top2_s1_FA <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Sal_Dis
summary(bn.top2_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -7.091 4.069 -1.743 0.0814 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 50.584 55.596 91.144 0.00152 **
## s(I(startdepth^0.25)) 4.605 4.883 38.065 1.96e-07 ***
## s(tempbotm) 2.564 3.049 14.498 0.00257 **
## s(turbbotm) 1.000 1.000 0.677 0.41059
## s(salbotm) 1.000 1.000 2.681 0.10159
## s(Dis.to.SHORE) 1.003 1.006 3.357 0.06699 .
## s(year) 8.868 16.000 19.758 0.00343 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.225 Deviance explained = 31.8%
## UBRE = -0.48927 Scale est. = 1 n = 2677
edf of both turbbotm and salbotm is 1 and p-value is not significant.
par(mfrow = c(2,2))
gam.check(bn.top2_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 8 iterations.
## Gradient range [-2.964092e-07,9.035072e-08]
## (score -0.489268 & scale 1).
## Hessian positive definite, eigenvalue range [1.13778e-08,0.001384957].
## Model rank = 101 / 101
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 59.00 50.58 0.95 0.07 .
## s(I(startdepth^0.25)) 7.00 4.60 0.99 0.85
## s(tempbotm) 5.00 2.56 0.98 0.65
## s(turbbotm) 4.00 1.00 0.98 0.64
## s(salbotm) 4.00 1.00 0.94 0.06 .
## s(Dis.to.SHORE) 4.00 1.00 0.96 0.32
## s(year) 17.00 8.87 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(2,3))
#par(mfrow = c(1,1))
for(i in 2:6){
plot(bn.top2_s1_FA,
select = i)
abline(h = 0, col = "red", lty = 2)
}
par(mfrow = c(1,1))
plot(bn.top2_s1_FA,
select = 2)
abline(h = 0, col = "red", lty = 2)
plot(bn.top2_s1_FA,
select = 3,
ylim = c(-10,10))
abline(h = 0, col = "red", lty = 2)
plot(bn.top2_s1_FA,
select = 4,
ylim = c(-2,2))
abline(h = 0, col = "red", lty = 2)
plot(bn.top2_s1_FA,
select = 5,
ylim = c(-5,5))
abline(h = 0, col = "red", lty = 2)
plot(bn.top2_s1_FA,
select = 6,
ylim = c(-5,5))
abline(h = 0, col = "red", lty = 2)
plot(bn.top2_s1_FA,
select = 7)
abline(h = 0, col = "red", lty = 2)
root startdepth is zero thoroughout it’s entire range.
tempbotm is positive approx. between 24 and 26 zero everywhere else.
turbbotm is zero everywhere
salbotm is zero everywhere
Dis.to.SHORE is zero everywhere
bn.top3_s1_FA <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy
summary(bn.top3_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(year,
## bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -7.077 4.472 -1.582 0.114
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 54.584 63.270 101.899 0.00143 **
## s(I(startdepth^0.25)) 4.655 4.913 40.937 5.34e-08 ***
## s(tempbotm) 2.583 3.066 13.946 0.00349 **
## s(turbbotm) 1.000 1.000 0.186 0.66602
## s(oxybotm) 3.930 4.796 10.537 0.07810 .
## s(year) 8.385 16.000 16.538 0.01145 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.233 Deviance explained = 32.6%
## UBRE = -0.48978 Scale est. = 1 n = 2674
gam.check(bn.top3_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 9 iterations.
## Gradient range [-1.32645e-07,2.710248e-10]
## (score -0.4897841 & scale 1).
## Hessian positive definite, eigenvalue range [5.340866e-09,0.001257979].
## Model rank = 115 / 115
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 74.00 54.58 0.95 0.085 .
## s(I(startdepth^0.25)) 7.00 4.66 0.99 0.820
## s(tempbotm) 5.00 2.58 0.99 0.735
## s(turbbotm) 4.00 1.00 0.98 0.600
## s(oxybotm) 7.00 3.93 1.01 0.960
## s(year) 17.00 8.38 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
plot(bn.top3_s1_FA,pages = 1)
bn.top19_s1_FA <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Oxy_Sal_Dis
summary(bn.top19_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -7.041 4.134 -1.703 0.0885 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 49.780 55.101 97.407 0.000357 ***
## s(I(startdepth^0.25)) 4.632 4.900 41.713 3.63e-08 ***
## s(tempbotm) 2.472 2.962 11.526 0.010695 *
## s(oxybotm) 3.679 4.449 9.878 0.080628 .
## s(salbotm) 1.000 1.000 3.244 0.071755 .
## s(Dis.to.SHORE) 1.005 1.009 3.698 0.054533 .
## s(year) 8.465 16.000 18.509 0.004210 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.229 Deviance explained = 31.9%
## UBRE = -0.4879 Scale est. = 1 n = 2737
gam.check(bn.top19_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 10 iterations.
## Gradient range [-3.494731e-07,1.19877e-07]
## (score -0.4879004 & scale 1).
## Hessian positive definite, eigenvalue range [1.322699e-07,0.001393325].
## Model rank = 103 / 103
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 59.00 49.78 0.95 0.05 *
## s(I(startdepth^0.25)) 7.00 4.63 1.00 0.88
## s(tempbotm) 5.00 2.47 0.97 0.38
## s(oxybotm) 6.00 3.68 1.00 0.95
## s(salbotm) 4.00 1.00 0.94 0.05 *
## s(Dis.to.SHORE) 4.00 1.01 0.96 0.14
## s(year) 17.00 8.47 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#par(mfrow = c(1,1))
plot(bn.top19_s1_FA,pages = 1)
plot(bn.top19_s1_FA,
select = 6)
abline(h = 0, col = "red", lty = 2)
I think the best model to use is the one with the same structure as the top model but without the turbbotm smooth.
bn_s1_FA_best <- bn_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Oxy_Sal
#-saves_8/22/18-#save(bn_s1_FA_best, file = "output/output_GAM/best_strat1/Female_Adult/bn_s1_FA_best.rda")
bt_s1_FA$results[c(1:20), c(1:4,7)]
bt.top_s1_FA <- bt_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(bt.top_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE, k = k_i[[i]]["k_0",
## "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.512 0.443 -10.19 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 25.613 31.420 66.771 0.000242 ***
## s(I(startdepth^0.25)) 1.001 1.002 0.053 0.819924
## s(tempbotm) 2.973 3.520 18.691 0.000637 ***
## s(turbbotm) 1.000 1.000 7.697 0.005535 **
## s(oxybotm) 3.557 4.176 10.221 0.041105 *
## s(salbotm) 1.000 1.000 3.989 0.045807 *
## s(Dis.to.SHORE) 2.052 2.510 4.981 0.230868
## s(year) 8.183 16.000 15.766 0.015744 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.292 Deviance explained = 38.1%
## UBRE = -0.63162 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bt.top_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 12 iterations.
## Gradient range [-4.255699e-08,1.451537e-07]
## (score -0.6316182 & scale 1).
## eigenvalue range [-1.447479e-07,0.001348041].
## Model rank = 89 / 89
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 25.61 0.98 0.690
## s(I(startdepth^0.25)) 4.00 1.00 0.94 0.100 .
## s(tempbotm) 5.00 2.97 0.96 0.310
## s(turbbotm) 4.00 1.00 0.98 0.825
## s(oxybotm) 5.00 3.56 0.92 0.005 **
## s(salbotm) 4.00 1.00 0.97 0.505
## s(Dis.to.SHORE) 5.00 2.05 0.97 0.550
## s(year) 17.00 8.18 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
depth, Turb, Sal edf all = 1.
plot(bt.top_s1_FA,
pages = 1)
par(mfrow = c(2,3))
for(i in 2:7){
plot(bt.top_s1_FA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
startdepth is zero
turbbotm looks linear decreasing to zero near 75ish, negative past 80.
Salbotm is zero but if CI were closer would be linear increasing.
** Dis.to.SHORE** is zero
bt.2_s1_FA <- bt_s1_FA$model_fits$Lat_Lon_Temp_Turb_Oxy
summary(bt.2_s1_FA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm,
## k = k_i[[i]]["k_0", "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.4967 0.4295 -10.47 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 27.426 33.258 101.681 7.69e-09 ***
## s(tempbotm) 2.937 3.483 22.591 0.000165 ***
## s(turbbotm) 1.006 1.011 6.968 0.008497 **
## s(oxybotm) 3.484 4.109 9.320 0.056524 .
## s(year) 8.013 16.000 14.786 0.022647 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.284 Deviance explained = 37.7%
## UBRE = -0.63122 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bt.2_s1_FA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 8 iterations.
## Gradient range [-5.273813e-07,1.019381e-07]
## (score -0.6312196 & scale 1).
## Hessian positive definite, eigenvalue range [5.434824e-07,0.002039663].
## Model rank = 76 / 76
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 27.43 0.98 0.80
## s(tempbotm) 5.00 2.94 0.95 0.24
## s(turbbotm) 4.00 1.01 0.98 0.81
## s(oxybotm) 5.00 3.48 0.92 0.01 **
## s(year) 17.00 8.01 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(2,2))
for(i in 2:5){
plot(bt.2_s1_FA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
anova.gam(bt.top_s1_FA, bt.2_s1_FA, test = "Chisq") ## No difference
AIC(bt.top_s1_FA, bt.2_s1_FA)
bt_s1_FA_best <- bt_s1_FA$model_fits$Lat_Lon_Temp_Turb_Oxy
#-saves_8/23/18-#save(bt_s1_FA_best, file = "output/output_GAM/best_strat1/Female_Adult/bt_s1_FA_best.rda")
bu_s1_FA$results[c(1:20), c(1:4,7)]
bu.top_s1_FA <- bu_s1_FA$model_fits$Lat_Lon_Root_Dep_Dis
summary(bu.top_s1_FA)
sb_s1_FA$results[c(1:20), c(1:4,7)]
sb.top_s1_FA <- sb_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Sal_Dis
summary(sb.top_s1_FA)
sp_s1_FA$results[c(1:20), c(1:4,7)]
sp.top_s1_FA <- sp_s1_FA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Dis
summary(sp.top_s1_FA)
ti_s1_FA$results[c(1:20), c(1:4,7)] # top 8 dAIC < 4
ti.top_s1_FA <- ti_s1_FA$model_fits$Lat_Lon
summary(ti.top_s1_FA)
#### Strata 1 ####
## Female Juvenile
filenames_s1_FJ <- list.files("output/output_GAM/strat1/Female_Juvenile", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s1_FJ ) ){ load( file = filenames_s1_FJ[ i ] ) }
rm( filenames_s1_FJ )
bn_s1_FJ$results[c(1:20), c(1:4,7)]
bn.top_s1_FJ <- bn_s1_FJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal
summary(bn.top_s1_FJ)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.800 1.361 -4.262 2.03e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 15.107 19.975 54.817 4.3e-05 ***
## s(I(startdepth^0.25)) 2.276 2.627 10.020 0.0116 *
## s(tempbotm) 3.063 3.368 4.882 0.3066
## s(turbbotm) 2.485 3.052 6.722 0.0901 .
## s(oxybotm) 1.001 1.002 3.221 0.0731 .
## s(salbotm) 1.000 1.001 3.324 0.0684 .
## s(year) 4.334 16.000 5.870 0.1511
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.159 Deviance explained = 28%
## UBRE = -0.58364 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bn.top_s1_FJ)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 8 iterations.
## Gradient range [-4.489654e-07,2.932907e-07]
## (score -0.583635 & scale 1).
## Hessian positive definite, eigenvalue range [1.504241e-07,0.00143772].
## Model rank = 85 / 85
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 15.11 0.93 0.01 **
## s(I(startdepth^0.25)) 5.00 2.28 0.99 0.90
## s(tempbotm) 5.00 3.06 0.99 0.85
## s(turbbotm) 5.00 2.48 0.96 0.33
## s(oxybotm) 4.00 1.00 0.97 0.44
## s(salbotm) 4.00 1.00 0.95 0.08 .
## s(year) 17.00 4.33 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bn.top_s1_FJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s1_FJ$results[c(1:20), c(1:4,7)]
bt.top_s1_FJ <- bt_s1_FJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Dis
summary(bt.top_s1_FJ)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -12.111 5.722 -2.117 0.0343 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 8.190 11.041 33.888 0.00035 ***
## s(I(startdepth^0.25)) 2.874 3.010 10.147 0.02140 *
## s(tempbotm) 1.000 1.000 2.215 0.13662
## s(turbbotm) 2.226 2.755 23.541 3.56e-05 ***
## s(oxybotm) 4.489 4.851 14.450 0.00923 **
## s(Dis.to.SHORE) 1.001 1.001 9.384 0.00219 **
## s(year) 7.372 16.000 15.093 0.01036 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.337 Deviance explained = 45.7%
## UBRE = -0.72631 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bt.top_s1_FJ)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 8 iterations.
## Gradient range [-1.608715e-07,5.434471e-07]
## (score -0.7263134 & scale 1).
## Hessian positive definite, eigenvalue range [9.670948e-08,0.001158392].
## Model rank = 85 / 85
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 8.19 0.99 0.66
## s(I(startdepth^0.25)) 5.00 2.87 0.99 0.78
## s(tempbotm) 4.00 1.00 0.93 <2e-16 ***
## s(turbbotm) 5.00 2.23 0.98 0.47
## s(oxybotm) 5.00 4.49 0.98 0.38
## s(Dis.to.SHORE) 4.00 1.00 0.93 <2e-16 ***
## s(year) 17.00 7.37 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bt.top_s1_FJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bu_s1_FJ$results[c(1:20), c(1:4,7)]
bu.top_s1_FJ <- bu_s1_FJ$model_fits$Lat_Lon_Root_Dep_Turb
summary(bu.top_s1_FJ)
sb_s1_FJ$results[c(1:20), c(1:4,7)]
sb.top_s1_FJ <- sb_s1_FJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb
summary(sb.top_s1_FJ)
sp_s1_FJ$results[c(1:20), c(1:4,7)]
sp.top_s1_FJ <- sp_s1_FJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(sp.top_s1_FJ)
ti_s1_FJ$results[c(1:20), c(1:4,7)]
ti.top_s1_FJ <- ti_s1_FJ$model_fits$Lat_Lon_Root_Dep_Turb_Sal_Dis
summary(ti.top_s1_FJ)
#### Strata 1 ####
## Male Adult
filenames_s1_MA <- list.files("output/output_GAM/strat1/Male_Adult", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s1_MA ) ){ load( file = filenames_s1_MA[ i ] ) }
rm( filenames_s1_MA )
bn_s1_MA$results[c(1:20), c(1:4,7)]
bn.top_s1_MA <- bn_s1_MA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(bn.top_s1_MA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE, k = k_i[[i]]["k_0",
## "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.741 1.708 -3.361 0.000777 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 43.658 51.687 156.605 2.03e-12 ***
## s(I(startdepth^0.25)) 2.698 3.126 16.497 0.000625 ***
## s(tempbotm) 3.916 4.303 2.939 0.520959
## s(turbbotm) 1.891 2.351 3.736 0.243220
## s(oxybotm) 1.937 2.418 3.959 0.155846
## s(salbotm) 2.272 2.847 7.871 0.034564 *
## s(Dis.to.SHORE) 1.001 1.002 6.645 0.009954 **
## s(year) 12.845 16.000 50.818 1.03e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.35 Deviance explained = 41.7%
## UBRE = -0.5446 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bn.top_s1_MA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 9 iterations.
## Gradient range [-4.722249e-07,1.165331e-07]
## (score -0.5446026 & scale 1).
## Hessian positive definite, eigenvalue range [4.717357e-07,0.00109428].
## Model rank = 111 / 111
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 64.00 43.66 0.99 0.745
## s(I(startdepth^0.25)) 6.00 2.70 0.95 0.065 .
## s(tempbotm) 6.00 3.92 0.99 0.680
## s(turbbotm) 4.00 1.89 1.03 0.990
## s(oxybotm) 4.00 1.94 0.98 0.500
## s(salbotm) 5.00 2.27 0.98 0.490
## s(Dis.to.SHORE) 4.00 1.00 0.99 0.750
## s(year) 17.00 12.84 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:8 ){
plot( bn.top_s1_MA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s1_MA$results[c(1:20), c(1:4,7)]
bt.top_s1_MA <- bt_s1_MA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Dis
summary(bt.top_s1_MA)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -5.244 0.731 -7.174 7.31e-13 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 25.118 31.000 68.536 0.000118 ***
## s(I(startdepth^0.25)) 1.931 2.272 7.742 0.070878 .
## s(tempbotm) 2.885 3.322 10.974 0.013612 *
## s(turbbotm) 3.720 4.302 13.968 0.009262 **
## s(oxybotm) 3.142 3.764 11.485 0.019681 *
## s(Dis.to.SHORE) 1.002 1.004 3.801 0.051286 .
## s(year) 5.172 16.000 8.705 0.045300 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.226 Deviance explained = 35.4%
## UBRE = -0.63944 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bt.top_s1_MA)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 6 iterations.
## Gradient range [-1.383859e-07,3.438899e-07]
## (score -0.639438 & scale 1).
## Hessian positive definite, eigenvalue range [1.371934e-07,0.0009193978].
## Model rank = 85 / 85
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 25.12 0.92 <2e-16 ***
## s(I(startdepth^0.25)) 4.00 1.93 0.95 0.17
## s(tempbotm) 5.00 2.88 0.96 0.21
## s(turbbotm) 5.00 3.72 0.96 0.35
## s(oxybotm) 5.00 3.14 0.97 0.57
## s(Dis.to.SHORE) 4.00 1.00 0.97 0.61
## s(year) 17.00 5.17 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bt.top_s1_MA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bu_s1_MA$results[c(1:20), c(1:4,7)]
bu.top_s1_MA <- bu_s1_MA$model_fits$Lat_Lon_Root_Dep_Turb_Dis
summary(bu.top_s1_MA)
WOW!!! lol only 1 male Adult Bull shark…
sb_s1_MA$results[c(1:20), c(1:4,7)]
sb.top_s1_MA <- sb_s1_MA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Dis
summary(sb.top_s1_MA)
sp_s1_MA$results[c(1:20), c(1:4,7)]
sp.top_s1_MA <- sp_s1_MA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(sp.top_s1_MA)
WOW!!! Unlikely
ti_s1_MA$results[c(1:20), c(1:4,7)]
ti.top_s1_MA <- ti_s1_MA$model_fits$Lat_Lon_Dis
summary(ti.top_s1_MA)
WOW!!! Unlikely
#### Strata 1 ####
## Male Juvenile
filenames_s1_MJ <- list.files("output/output_GAM/strat1/Male_Juvenile", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s1_MJ ) ){ load( file = filenames_s1_MJ[ i ] ) }
rm( filenames_s1_MJ )
bn_s1_MJ$results[c(1:20), c(1:4,7)]
bn.top_s1_MJ <- bn_s1_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Dis
summary(bn.top_s1_MJ)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -4.6669 0.6013 -7.761 8.41e-15 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 24.297 30.679 68.024 0.000135 ***
## s(I(startdepth^0.25)) 2.200 2.613 17.336 0.013000 *
## s(tempbotm) 1.011 1.020 4.080 0.043679 *
## s(turbbotm) 1.913 2.361 4.888 0.121610
## s(oxybotm) 2.058 2.577 5.084 0.094590 .
## s(Dis.to.SHORE) 2.055 2.506 7.593 0.060177 .
## s(year) 10.739 16.000 25.077 0.001680 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.222 Deviance explained = 32.6%
## UBRE = -0.56125 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bn.top_s1_MJ)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 8 iterations.
## Gradient range [-1.568556e-06,6.2321e-07]
## (score -0.5612491 & scale 1).
## Hessian positive definite, eigenvalue range [6.485626e-07,0.001140406].
## Model rank = 90 / 90
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 49.00 24.30 0.96 0.18
## s(I(startdepth^0.25)) 5.00 2.20 1.00 0.96
## s(tempbotm) 4.00 1.01 0.97 0.38
## s(turbbotm) 4.00 1.91 0.98 0.63
## s(oxybotm) 5.00 2.06 0.97 0.37
## s(Dis.to.SHORE) 5.00 2.06 0.96 0.26
## s(year) 17.00 10.74 NA NA
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bn.top_s1_MJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s1_MJ$results[c(1:20), c(1:4,7)]
bt.top_s1_MJ <- bt_s1_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(bt.top_s1_MJ)
##
## Family: binomial
## Link function: logit
##
## Formula:
## pres ~ s(startlon, startlat, k = k_i[[i]]["k_0", "Lat_Lon"] +
## 35) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE, k = k_i[[i]]["k_0",
## "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -23.770 6.796 -3.498 0.000469 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df Chi.sq p-value
## s(startlon,startlat) 57.990 58.734 87.719 0.00991 **
## s(I(startdepth^0.25)) 1.388 1.653 0.681 0.65426
## s(tempbotm) 3.834 4.080 4.104 0.37735
## s(turbbotm) 2.673 3.263 14.216 0.00380 **
## s(oxybotm) 3.748 4.565 5.743 0.29527
## s(salbotm) 2.969 3.658 9.573 0.03729 *
## s(Dis.to.SHORE) 1.000 1.001 1.704 0.19182
## s(year) 9.154 16.000 17.605 0.01516 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.365 Deviance explained = 49.7%
## UBRE = -0.71683 Scale est. = 1 n = 2674
par(mfrow = c(2,2))
gam.check(bt.top_s1_MJ)
##
## Method: UBRE Optimizer: outer newton
## full convergence after 11 iterations.
## Gradient range [-1.213233e-07,8.19273e-07]
## (score -0.7168305 & scale 1).
## Hessian positive definite, eigenvalue range [1.21295e-07,0.0009143236].
## Model rank = 109 / 109
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 59.00 57.99 1.04 0.995
## s(I(startdepth^0.25)) 5.00 1.39 0.96 0.105
## s(tempbotm) 6.00 3.83 0.96 0.075 .
## s(turbbotm) 5.00 2.67 0.98 0.455
## s(oxybotm) 7.00 3.75 0.98 0.385
## s(salbotm) 5.00 2.97 0.99 0.585
## s(Dis.to.SHORE) 4.00 1.00 0.96 0.095 .
## s(year) 17.00 9.15 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:8 ){
plot( bt.top_s1_MJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bu_s1_MJ$results[c(1:20), c(1:4,7)]
bu.top_s1_MJ <- bu_s1_MJ$model_fits$Lat_Lon_Root_Dep_Turb_Oxy_Sal
summary(bu.top_s1_MJ)
sb_s1_MJ$results[c(1:20), c(1:4,7)] ### Top 7 dAIC < 4
### Lat_Lon in Model 4
sb.top_s1_MJ <- sb_s1_MJ$model_fits$Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(sb.top_s1_MJ)
sb.top4_s1_MJ <- sb_s1_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal
summary(sb.top4_s1_MJ)
sp_s1_MJ$results[c(1:20), c(1:4,7)]
sp.top_s1_MJ <- sp_s1_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Dis
summary(sp.top_s1_MJ)
ti_s1_MJ$results[c(1:20), c(1:4,7)] ### Top 21 dAIC < 4
ti.top_s1_MJ <- ti_s1_MJ$model_fits$Lat_Lon_Root_Dep_Turb
summary(ti.top_s1_MJ)
#### Strata 2 ####
## Female Adult
filenames_s2_FA <- list.files("output/output_GAM/strat2/Female_Adult", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s2_FA ) ){ load( file = filenames_s2_FA[ i ] ) }
rm( filenames_s2_FA )
bn_s2_FA$results[c(1:20), c(1:4,7)]
bn.top.s2_FA <- bn_s2_FA$model_fits$Lat_Lon_Turb_Dis
summary(bn.top.s2_FA)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(turbbotm, k = k_i[[i]]["k_0", "Turb"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.0227 0.0273 37.46 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 5.079e+01 64.55 1.196 0.173
## s(turbbotm) 1.000e+00 1.00 1.017 0.314
## s(Dis.to.SHORE) 1.000e+00 1.00 0.186 0.667
## s(year) 4.645e-04 16.00 0.000 0.775
##
## R-sq.(adj) = 0.115 Deviance explained = 40.7%
## GCV = 0.2019 Scale est. = 0.20939 n = 281
par(mfrow = c(2,2))
gam.check(bn.top.s2_FA)
##
## Method: GCV Optimizer: outer newton
## full convergence after 10 iterations.
## Gradient range [-1.845622e-07,-4.999857e-09]
## (score 0.2019046 & scale 0.2093924).
## Hessian positive definite, eigenvalue range [4.999853e-09,0.007194432].
## Model rank = 110 / 110
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 8.40e+01 5.08e+01 1.23 1.00
## s(turbbotm) 4.00e+00 1.00e+00 0.98 0.47
## s(Dis.to.SHORE) 4.00e+00 1.00e+00 1.05 0.88
## s(year) 1.70e+01 4.64e-04 NA NA
par(mfrow = c(1,1))
for(i in 2:4 ){
plot( bn.top.s2_FA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s2_FA$results
bt.top.s2_FA <- bt_s2_FA$model_fits$Lat_Lon_Turb_Oxy_Sal_Dis_Bottm
summary(bt.top.s2_FA)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(turbbotm, k = k_i[[i]]["k_0", "Turb"]) + s(oxybotm,
## k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0",
## "Sal"]) + s(Dis.to.SHORE, k = k_i[[i]]["k_0", "Dis"]) + bottype4 +
## s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.8556 0.2279 3.754 0.000242 ***
## bottype4Mud 0.1670 0.2420 0.690 0.491149
## bottype4Rock 0.1743 0.4694 0.371 0.710818
## bottype4Sand 0.1603 0.2274 0.705 0.482036
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 3.057e+01 38.343 0.831 0.761
## s(turbbotm) 1.222e+00 1.397 0.036 0.900
## s(oxybotm) 1.000e+00 1.000 1.645 0.201
## s(salbotm) 1.824e+00 2.261 1.267 0.263
## s(Dis.to.SHORE) 1.000e+00 1.000 0.084 0.772
## s(year) 3.323e-04 16.000 0.000 0.695
##
## R-sq.(adj) = 0.125 Deviance explained = 46%
## GCV = 0.20452 Scale est. = 0.22593 n = 201
par(mfrow = c(2,2))
gam.check(bt.top.s2_FA)
##
## Method: GCV Optimizer: outer newton
## full convergence after 11 iterations.
## Gradient range [-7.937647e-08,-6.98817e-09]
## (score 0.2045176 & scale 0.2259285).
## Hessian positive definite, eigenvalue range [6.988093e-09,0.005753767].
## Model rank = 87 / 87
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 4.90e+01 3.06e+01 1.19 1.00
## s(turbbotm) 4.00e+00 1.22e+00 0.98 0.43
## s(oxybotm) 4.00e+00 1.00e+00 1.10 0.94
## s(salbotm) 5.00e+00 1.82e+00 1.04 0.88
## s(Dis.to.SHORE) 4.00e+00 1.00e+00 1.07 0.88
## s(year) 1.70e+01 3.32e-04 NA NA
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bt.top.s2_FA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
FAILED to fit model
bu_s2_FA$results
bu.top.s2_FA <- bu_s2_FA$model_fits
summary(bu.top.s2_FA)
sb_s2_FA$results
sb.top.s2_FA <- sb_s2_FA$model_fits$Lat_Lon_Temp_Turb_Dis
summary(sb.top.s2_FA)
Failed to Fit
sp_s2_FA$results
sp.top.s2_FA <- sp_s2_FA$model_fits
summary(sp.top.s2_FA)
Failed to Fit
ti_s2_FA$results
ti.top.s2_FA <- ti_s2_FA$model_fits
summary(ti.top.s2_FA)
#### Strata 2 ####
## Female Juvenile
filenames_s2_FJ <- list.files("output/output_GAM/strat2/Female_Juvenile", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s2_FJ ) ){ load( file = filenames_s2_FJ[ i ] ) }
rm( filenames_s2_FJ )
bn_s2_FJ$results
bn.top.s2_FJ <- bn_s2_FJ$model_fits$Lat_Lon_Temp_Turb_Oxy_Sal_Bottm
summary(bn.top.s2_FJ)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm,
## k = k_i[[i]]["k_0", "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + bottype4 +
## s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.88454 0.08182 10.811 <2e-16 ***
## bottype4Mud 0.13801 0.13221 1.044 0.298
## bottype4Rock 0.19935 0.16492 1.209 0.229
## bottype4Sand 0.01249 0.08657 0.144 0.885
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 37.630 44.495 1.609 0.0204 *
## s(tempbotm) 1.000 1.000 4.818 0.0296 *
## s(turbbotm) 1.000 1.000 0.041 0.8395
## s(oxybotm) 4.319 5.021 1.363 0.2412
## s(salbotm) 1.000 1.000 1.565 0.2128
## s(year) 1.063 16.000 0.058 0.5215
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.246 Deviance explained = 52.4%
## GCV = 0.13709 Scale est. = 0.12237 n = 204
par(mfrow = c(2,2))
gam.check(bn.top.s2_FJ)
##
## Method: GCV Optimizer: outer newton
## full convergence after 10 iterations.
## Gradient range [-7.685031e-08,2.956633e-08]
## (score 0.137088 & scale 0.1223676).
## Hessian positive definite, eigenvalue range [3.68159e-09,0.004954792].
## Model rank = 88 / 88
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 49.00 37.63 1.17 1.00
## s(tempbotm) 4.00 1.00 1.10 0.92
## s(turbbotm) 4.00 1.00 1.06 0.80
## s(oxybotm) 6.00 4.32 0.96 0.28
## s(salbotm) 4.00 1.00 1.08 0.87
## s(year) 17.00 1.06 NA NA
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bn.top.s2_FJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s2_FJ$results
bt.top.s2_FJ <- bt_s2_FJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal
summary(bt.top.s2_FJ)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.17913 0.07139 16.52 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 6.237 8.249 0.633 0.7629
## s(I(startdepth^0.25)) 2.478 3.064 3.319 0.0215 *
## s(tempbotm) 2.509 3.049 1.590 0.1896
## s(turbbotm) 4.539 5.242 1.322 0.2167
## s(oxybotm) 1.000 1.000 6.102 0.0147 *
## s(salbotm) 4.288 4.998 2.249 0.0542 .
## s(year) 8.617 16.000 0.876 0.0609 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.36 Deviance explained = 55.2%
## GCV = 0.23892 Scale est. = 0.21357 n = 166
par(mfrow = c(2,2))
gam.check(bt.top.s2_FJ)
##
## Method: GCV Optimizer: outer newton
## full convergence after 9 iterations.
## Gradient range [-2.192482e-07,5.640084e-08]
## (score 0.2389236 & scale 0.2135671).
## Hessian positive definite, eigenvalue range [2.191957e-07,0.003961029].
## Model rank = 93 / 93
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 49.00 6.24 1.10 0.96
## s(I(startdepth^0.25)) 5.00 2.48 1.10 0.92
## s(tempbotm) 5.00 2.51 0.99 0.54
## s(turbbotm) 6.00 4.54 1.07 0.83
## s(oxybotm) 4.00 1.00 1.10 0.94
## s(salbotm) 6.00 4.29 1.10 0.95
## s(year) 17.00 8.62 NA NA
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bt.top.s2_FJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
FAILED To Fit
bu_s2_FJ$results
bu.top.s2_FJ <- bu_s2_FJ$model_fits
summary(bu.top.s2_FJ)
sb_s2_FJ$results
sb.top.s2_FJ <- sb_s2_FJ$model_fits$Lat_Lon_Turb_Dis
summary(sb.top.s2_FJ)
sp_s2_FJ$results
sp.top.s2_FJ <- sp_s2_FJ$model_fits$Lat_Lon_Temp_Turb_Sal_Dis
summary(sp.top.s2_FJ)
ti_s2_FJ$results
ti.top.s2_FJ <- ti_s2_FJ$model_fits$Lat_Lon_Temp_Turb_Dis_Bottm
summary(ti.top.s2_FJ)
#### Strata 2 ####
## Male Adult
filenames_s2_MA <- list.files("output/output_GAM/strat2/Male_Adult", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s2_MA ) ){ load( file = filenames_s2_MA[ i ] ) }
rm( filenames_s2_MA )
load("output/output_GAM/strat2/Male_Adult/bn_s2_MA.rda")
load("output/output_GAM/strat2/Male_Adult/bt_s2_MA.rda")
load("output/output_GAM/strat2/Male_Adult/sn_s2_MA.rda")
bn_s2_MA$results
bn.top.s2_MA <- bn_s2_MA$model_fits$Lat_Lon_Temp_Turb_Oxy_Sal_Bottm
summary(bn.top.s2_MA)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm,
## k = k_i[[i]]["k_0", "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + bottype4 +
## s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.16985 0.13864 8.438 2.88e-15 ***
## bottype4Mud -0.06725 0.16838 -0.399 0.69
## bottype4Rock 0.34099 0.28929 1.179 0.24
## bottype4Sand 0.17541 0.13970 1.256 0.21
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 26.777 34.938 1.260 0.1672
## s(tempbotm) 1.849 2.254 1.019 0.3359
## s(turbbotm) 1.003 1.005 0.016 0.8978
## s(oxybotm) 4.203 5.035 1.921 0.0948 .
## s(salbotm) 2.829 3.428 3.246 0.0177 *
## s(year) 6.293 16.000 0.480 0.2104
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.168 Deviance explained = 44.1%
## GCV = 0.31712 Scale est. = 0.32521 n = 291
par(mfrow = c(2,2))
gam.check(bn.top.s2_MA)
##
## Method: GCV Optimizer: outer newton
## full convergence after 7 iterations.
## Gradient range [-1.287003e-06,8.769384e-07]
## (score 0.3171185 & scale 0.325213).
## Hessian positive definite, eigenvalue range [3.582848e-07,0.004886936].
## Model rank = 95 / 95
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 54.00 26.78 1.06 0.96
## s(tempbotm) 4.00 1.85 0.89 0.07 .
## s(turbbotm) 4.00 1.00 1.07 0.94
## s(oxybotm) 7.00 4.20 1.00 0.66
## s(salbotm) 5.00 2.83 0.97 0.49
## s(year) 17.00 6.29 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bn.top.s2_MA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s2_MA$results
bt.top.s2_MA <- bt_s2_MA$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Sal_Dis
summary(bt.top.s2_MA)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + s(Dis.to.SHORE,
## k = k_i[[i]]["k_0", "Dis"]) + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.96141 0.05074 18.95 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 5.462 7.313 1.429 0.1814
## s(I(startdepth^0.25)) 1.173 1.315 3.047 0.0528 .
## s(tempbotm) 1.000 1.000 3.291 0.0714 .
## s(turbbotm) 1.594 1.950 1.045 0.3013
## s(salbotm) 1.000 1.000 4.433 0.0367 *
## s(Dis.to.SHORE) 1.000 1.000 5.031 0.0262 *
## s(year) 8.162 16.000 0.867 0.0472 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.134 Deviance explained = 32.8%
## GCV = 0.15903 Scale est. = 0.19363 n = 187
par(mfrow = c(2,2))
gam.check(bt.top.s2_MA)
##
## Method: GCV Optimizer: outer newton
## full convergence after 11 iterations.
## Gradient range [-1.112487e-07,2.165706e-08]
## (score 0.1590312 & scale 0.1936253).
## Hessian positive definite, eigenvalue range [1.259283e-08,0.003886915].
## Model rank = 82 / 82
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 44.00 5.46 1.16 1.00
## s(I(startdepth^0.25)) 4.00 1.17 1.06 0.82
## s(tempbotm) 4.00 1.00 0.95 0.24
## s(turbbotm) 4.00 1.59 0.99 0.49
## s(salbotm) 4.00 1.00 0.98 0.40
## s(Dis.to.SHORE) 4.00 1.00 1.05 0.82
## s(year) 17.00 8.16 NA NA
par(mfrow = c(1,1))
for(i in 2:7 ){
plot( bt.top.s2_MA,
select = i)
abline(h = 0, col = "red", lty = 3)
}
FAILED To Fit
bu_s2_MA$results
bu.top.s2_MA <- bu_s2_MA$model_fits
summary(bu.top.s2_MA)
FAILED To Fit
sb_s2_MA$results
sb.top.s2_MA <- sb_s2_MA$model_fits
summary(sb.top.s2_MA)
FAILED To Fit
sp_s2_MA$results
sp.top.s2_MA <- sp_s2_MA$model_fits
summary(sp.top.s2_MA)
FAILED To Fit
ti_s2_MA$results
ti.top.s2_MA <- ti_s2_MA$model_fits
summary(ti.top.s2_MA)
#### Strata 2 ####
## Male Juvenile
filenames_s2_MJ <- list.files("output/output_GAM/strat2/Male_Juvenile", pattern="*.rda", full.names=TRUE)
for( i in 1:length( filenames_s2_MJ ) ){ load( file = filenames_s2_MJ[ i ] ) }
rm( filenames_s2_MJ )
bn_s2_MJ$results
bn.top.s2_MJ <- bn_s2_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal_Bottyp
summary(bn.top.s2_MJ)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(tempbotm, k = k_i[[i]]["k_0", "Temp"]) + s(turbbotm, k = k_i[[i]]["k_0",
## "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0", "Oxy"]) + s(salbotm,
## k = k_i[[i]]["k_0", "Sal"]) + bottype4 + s(year, bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.84278 0.10185 8.275 2.32e-14 ***
## bottype4Mud 0.09675 0.14306 0.676 0.500
## bottype4Rock 0.22650 0.17252 1.313 0.191
## bottype4Sand 0.14361 0.10638 1.350 0.179
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 28.502438 35.323 0.930 0.528
## s(I(startdepth^0.25)) 2.304337 2.750 1.422 0.324
## s(tempbotm) 1.662937 2.029 0.668 0.530
## s(turbbotm) 4.114370 4.633 1.618 0.125
## s(oxybotm) 3.944565 4.491 1.411 0.240
## s(salbotm) 1.548010 1.855 1.930 0.208
## s(year) 0.000197 16.000 0.000 0.867
##
## R-sq.(adj) = 0.103 Deviance explained = 36.7%
## GCV = 0.16605 Scale est. = 0.17122 n = 234
par(mfrow = c(2,2))
gam.check(bn.top.s2_MJ)
##
## Method: GCV Optimizer: outer newton
## full convergence after 11 iterations.
## Gradient range [-1.142392e-07,1.664305e-09]
## (score 0.1660527 & scale 0.1712205).
## Hessian positive definite, eigenvalue range [1.142379e-07,0.00426818].
## Model rank = 87 / 87
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 4.40e+01 2.85e+01 1.09 0.97
## s(I(startdepth^0.25)) 4.00e+00 2.30e+00 1.02 0.59
## s(tempbotm) 4.00e+00 1.66e+00 0.95 0.24
## s(turbbotm) 5.00e+00 4.11e+00 0.99 0.50
## s(oxybotm) 5.00e+00 3.94e+00 1.01 0.68
## s(salbotm) 4.00e+00 1.55e+00 0.82 <2e-16 ***
## s(year) 1.70e+01 1.97e-04 NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
par(mfrow = c(1,1))
for(i in 2:8 ){
plot( bn.top.s2_MJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
bt_s2_MJ$results
bt.top.s2_MJ <- bt_s2_MJ$model_fits$Lat_Lon_Root_Dep_Turb_Oxy_Sal
summary(bt.top.s2_MJ)
##
## Family: Gamma
## Link function: log
##
## Formula:
## (CPUE + 1) ~ s(startlon, startlat, k = (k_i[[i]]["k_0", "Lat_Lon"] +
## 35)) + s(I(startdepth^0.25), k = k_i[[i]]["k_0", "Root_Dep"]) +
## s(turbbotm, k = k_i[[i]]["k_0", "Turb"]) + s(oxybotm, k = k_i[[i]]["k_0",
## "Oxy"]) + s(salbotm, k = k_i[[i]]["k_0", "Sal"]) + s(year,
## bs = "re")
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.04583 0.09563 10.94 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(startlon,startlat) 7.872 10.488 1.291 0.24117
## s(I(startdepth^0.25)) 2.854 3.477 1.877 0.10595
## s(turbbotm) 1.000 1.000 1.501 0.22288
## s(oxybotm) 5.688 6.584 2.532 0.01597 *
## s(salbotm) 4.667 5.572 2.979 0.00988 **
## s(year) 12.247 16.000 1.349 0.03198 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.396 Deviance explained = 61.6%
## GCV = 0.16883 Scale est. = 0.14052 n = 153
par(mfrow = c(2,2))
gam.check(bt.top.s2_MJ)
##
## Method: GCV Optimizer: outer newton
## full convergence after 12 iterations.
## Gradient range [-1.394889e-07,1.473762e-09]
## (score 0.1688277 & scale 0.1405247).
## Hessian positive definite, eigenvalue range [1.394785e-07,0.002283078].
## Model rank = 106 / 106
##
## Basis dimension (k) checking results. Low p-value (k-index<1) may
## indicate that k is too low, especially if edf is close to k'.
##
## k' edf k-index p-value
## s(startlon,startlat) 64.00 7.87 1.14 0.99
## s(I(startdepth^0.25)) 5.00 2.85 1.07 0.81
## s(turbbotm) 4.00 1.00 1.07 0.84
## s(oxybotm) 8.00 5.69 0.94 0.27
## s(salbotm) 7.00 4.67 1.13 0.93
## s(year) 17.00 12.25 NA NA
par(mfrow = c(1,1))
for(i in 2:5 ){
plot( bt.top.s2_MJ,
select = i)
abline(h = 0, col = "red", lty = 3)
}
Failed to fit
bu_s2_MJ$results
bu.top.s2_MJ <- bu_s2_MJ$model_fits
summary(bu.top.s2_MJ)
sb_s2_MJ$results
sb.top.s2_MJ <- sb_s2_MJ$model_fits$Lat_Lon_Turb_Sal
summary(sb.top.s2_MJ)
sp_s2_MJ$results ### top 11 dAIC < 4
### Lat_Lon in Top 2
sp.top.s2_MJ <- sp_s2_MJ$model_fits$Root_Dep_Temp_Turb_Oxy_Sal
summary(sp.top.s2_MJ)
sp.top2.s2_MJ <- sp_s2_MJ$model_fits$Lat_Lon_Root_Dep_Temp_Turb_Oxy_Sal
summary(sp.top2.s2_MJ)
ti_s2_MJ$results ### Top 110 dAIC < 4
### Lat_Lon in Top 57
ti.top.s2_MJ <- ti_s2_MJ$model_fits$Temp_Oxy_Dis_Bottyp
summary(ti.top.s2_MJ)
ti.top57.s2_MJ <- ti_s2_MJ$model_fits$Lat_Lon_Oxy_Dis_Bottyp
summary(ti.top57.s2_MJ)